import { goodshotgame } from '../api/index'
import http from '../utils/http'
import { message } from 'antd'

const indexModel = {
  state: {
    name: 'indexModel',
  },
  reducers: {
    updateState(state, payload) {
      return {
        ...state,
        ...payload,
      }
    },
  },
  effects: (dispatch) => ({
    // dispatch 可以调用别的model 例：dispatch[modelName].方法名
    updateName(payload) {
      this.updateState({
        name: payload,
      })
    },
  }),
}

export default indexModel
